package com.zatech.cgnci.project.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
public class CombinedCostSaveOrUpdateDTO {

    @ApiModelProperty("id自增")
    private Long id;

    @ApiModelProperty("年度")
    private String annual;

    @ApiModelProperty("季度")
    private String quarterly;

    @ApiModelProperty("综合成本率")
    private BigDecimal costRatio;

    @ApiModelProperty("指标阈值")
    private String metricThreshold;

    @ApiModelProperty("指标结果")
    private String metricResult;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty(value = "文件list")
    private List<AccessoryDTO> accessoryDTOList;

    @Data
    public static class AccessoryDTO {

        @ApiModelProperty(value = "accId")
        private Long accId;

        @ApiModelProperty(value = "业务编号(关联业务表主键id)", hidden = true)
        private Long businessId;

        @ApiModelProperty(value = "业务号", hidden = true)
        private String businessNo;

        @ApiModelProperty(value = "业务类型（根据业务自定义业务类型进行区分）", hidden = true)
        private String businessType;

        @ApiModelProperty(value = "文件类型", hidden = true)
        private String accType;

        @ApiModelProperty(value = "上传节点", hidden = true)
        private String uploadNode;

        @ApiModelProperty(value = "附件云编号", hidden = true)
        private String fileId;

        @ApiModelProperty(value = "附件名称", hidden = true)
        private String fileName;

        @ApiModelProperty(value = "附件类型", hidden = true)
        private String fileType;

        @ApiModelProperty(value = "有效起期", hidden = true)
        private Date startTime;

        @ApiModelProperty(value = "有效止期", hidden = true)
        private Date endTime;

        @ApiModelProperty(value = "上传时间", hidden = true)
        @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT-8")
        private Date uploadTime;

        @ApiModelProperty(value = "状态（0：失败，1：成功）", hidden = true)
        private String status;

        @ApiModelProperty(value = "操作结果描述", hidden = true)
        private String msg;

        @ApiModelProperty(value = "删除标志位（0：未删除，1：已删除）", hidden = true)
        private Integer dr;

    }
}
